package cn.tedu.ivos.context;

import cn.tedu.ivos.pojo.LoginUser;

public class AuthenticationContext {
    private static InheritableThreadLocal<LoginUser> loginTokenThreadLocal =
            new InheritableThreadLocal();
    public static void bindLoginToken(LoginUser loginToken) {
        loginTokenThreadLocal.set(loginToken);
    }
    public static LoginUser getLoginToken() {
        return (LoginUser)loginTokenThreadLocal.get();
    }
    public static void clearLoginToken() {
        loginTokenThreadLocal.remove();
    }
}
